
************************************************************
*  Regressions in Table 56
************************************************************

clear
# delimit ;
version 11;
set matsize 1000;
capture log close;
set more 1;
log using table5b.log, replace;

use data_5yr_stacked;

quietly tab regno, gen(reg);
quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2 if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;
replace time=5 if agegroup==6;
replace time=6 if agegroup==7;

*  Married fertility rates;
*  Age 16-44;
*  With female employment to population ratio;
reg asbrm sr10a epopf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrmu sr10u epopfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrmr sr10r epopfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
*  With female age-specific death rate;
reg asbrm sr10a asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrmu sr10u asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrmr sr10r asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);

*  Unmarried fertility rates;
*  With female employment to population ratio;
reg asbrnd sr10a epopf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrndu sr10u epopfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrndr sr10r epopfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
*  With female age-specific death rate;
reg asbrnd sr10a asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrndu sr10u asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrndr sr10r asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);

*  % Out-of-wedlock births;
*  With female employment to population ratio;
reg nodad sr10a epopf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodadu sr10u epopfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodadr sr10r epopfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
*  With female age-specific death rate;
reg nodad sr10a asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodadu sr10u asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodadr sr10r asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
clear;

*  Divorce regressions (diffeent age groups than previous regressions);
use data_5yr_stacked_div;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2 if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;

quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

gen lnpop=log(pop);
gen lnpopu=log(popu);
gen lnpopr=log(popr);
gen urbsh=(popmu+popfu)/(popm+popf) ;

*  Age 18-49;
*  Divorces per 1000 married population in each age group;
*  With female employment to population ratio;
reg divr sr10a epopf lnpop urbsh i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divru sr10u epopfu lnpopu i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divrr sr10r epopfr lnpopr i.agegroup i.regno i.regno#c.time, cluster(regno);
*  With female age-specific death rate;
reg divr sr10a asdrf lnpop urbsh i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divru sr10u asdrfu lnpopu i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divrr sr10r asdrfr lnpopr i.agegroup i.regno i.regno#c.time, cluster(regno);
clear;


*  Deaths from abortion regressions (diffeent age groups than previous regressions);
*  Abortion death data are for 16-19, 20-24, 25-29, 30-39 and 40-49 age groups;
*  No urban abortion death data 1959 for Chechnya --  missing from archives;
*  And no rural abortion data 1959 for Astrakhanskaya oblast and Khabarovskii krai;

use data_5yr_stacked_dabo;
sort agegroup;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2  if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;

quietly tab regno, gen(reg);
quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

*  Age 16-49;
*  With female employment to population ratio;
reg dabobth sr10a epopf lnpopm urbshf i.agegroup i.regno i.regno#c.time, cluster(regno);
reg dabobthu sr10u epopfu lnpopmu i.agegroup i.regno i.regno#c.time, cluster(regno);
reg dabobthr sr10r epopfr lnpopmr i.agegroup i.regno i.regno#c.time, cluster(regno);
*  With female age-specific death rate;
reg dabobth sr10a asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time, cluster(regno);
reg dabobthu sr10u asdrfu lnpopmu i.agegroup i.regno i.regno#c.time, cluster(regno);
reg dabobthr sr10r asdrfr lnpopmr i.agegroup i.regno i.regno#c.time, cluster(regno);

log close;


